{% extends 'base.html' %}

{% block content %}
    <h1>{% block title %} FlaskShortener Statistics {% endblock %}</h1>
    <table class="table">
        <thead>
            <tr>
            <th scope="col">#</th>
            <th scope="col">Short</th>
            <th scope="col">Original</th>
            <th scope="col">Clicks</th>
            <th scope="col">Creation Date</th>
            </tr>
        </thead>
        <tbody>
            {% for url in urls %}
                <tr>
                    <th scope="row">
                        {{ url.id }}
                    </th>
                    <td>
                        <a href="{{ short_urls[url.id] }}">{{ short_urls[url.id] }}</a>
                    </td>
                    <td>
                        <a href="{{ url.original }}">{{ url.original }}</a>
                    </td>
                    <td>
                        {{ url.clicks }}
                    </td>
                    <td>
                        {{ url.created }}
                    </td>
                </tr>
            {% endfor %}
        </tbody>
    </table>

{% endblock %}
